﻿using System;

namespace Loki.Data
{
    public class DefaultFactory<TEntityClass> : IFactory<TEntityClass>
    {
        private Func<TEntityClass> _Builder;

        public DefaultFactory()
        {
            _Builder = ExpressionHelper.New<TEntityClass>().Compile();
        }

        public TEntityClass Create(object P_Discriminator)
        {
            return _Builder();
        }
    }
}
